﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using System.Collections.Specialized;

namespace ITManagerProject
{
   public class Common
    {
       public static class Constant
       {
           //Tiền tố mã code khi đăng một dự án
           
           //list tiep nhan
           public static readonly string DEPARTMENTNAME = "DepartMentName";
           public static readonly string ADDRESS = "Address";
           public static readonly string EMAIL = "Email";
           public static readonly string PROJECTNAME = "ProjectName";
           public static readonly string PHONENUMBER = "PhoneNumber";
           public static readonly string COMPANYPHONE = "CompanyPhone";
           public static readonly string PROJECTVALUE = "ProjectValue";
           public static readonly string CREATEBYUSER = "CreateByUser";
           public static readonly string STATUS = "Status";
           public static readonly string IDCODE = "IDCode";
           public static readonly string RECEVINGBY = "RecevingBy";
           public static readonly string RECEVINGDATE = "RecevingDate";
           public static readonly string NUMBERFILEATTACH = "NumberFileAttach";
           public static readonly string REGESTRYCODE = "Regestrycode";
           public static readonly string FILENAME = "FileName";
           public static readonly string REGESTRYNAME = "RegestryName";
           public static readonly string FUNCTIONAL = "Functional";
           public static readonly string ADDTACHFILE = "Addtchfile";

           //list Thu ly

           public  enum ProjectTypeCode
           {
               B1 = 0,
               B2 = 1
           }

           public enum FunctionalType
           {
               GD = 0,
               TP = 1,
               PP = 2,
               NV = 3

           }
            
       }

     

       public static bool Checklistexits(string listname,SPWeb sweb)
       {
           bool status;
           SPList olist = sweb.Lists[listname];

           try
           {
               if (olist != null)
               {

                   status = true;
               }
               else
               {

                   status = false;
               }

           }
           catch {
               status = false;
           }
           finally { status = true; }
           return status;
       }

    }

   
}
